﻿@model IEnumerable<LynxWebLog.PostData>

@{
    ViewBag.Title = "Index";
}

<h2>Post Entries for Category - ViewBag.Category</h2>


<div class="table-responsive">
<table class="table">
    <tr>
        <th>
            @Html.DisplayNameFor(model => model.postid)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.blogid)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.title)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.IsPublished)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.dateCreated)
        </th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.postid)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.blogid)
        </td>
        <td>
            @Html.ActionLink(item.title, "Post", "Blog", new { id = item.title }, null)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.IsPublished)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.dateCreated)
        </td>
    </tr>
}

</table>
</div>
